import mvvm from '../main'
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'

export default {
  computed: {
    ...mapState([
      'app',
      'user',
    ]),
    ...mapGetters([
      'token',
      'roles'
    ])
  },
  methods: {
    ...mapMutations([
      'setStateData',
      // 'setUserInfo',
      // 'clearUserInfo'
    ]),
    // ...mapActions([
    //   'updateUserInfo'
    // ])
    setMduleStateData(module, data) {
      mvvm.$store.commit('setMduleStateData', {
        module,
        data,
      })
    }
  }
}
